package challenge;

import static org.junit.Assert.*;
import org.junit.*;

public class ArrayStringTest {
	
	@Test
	public void toArrayTest(){
		assertEquals(ArrayString.toArray("あいうえお")[0],"あいうえお");
		assertEquals(ArrayString.toArray("あいうえお").length,1);
		assertEquals(ArrayString.toArray("あい うえお")[0],"あい");
		assertEquals(ArrayString.toArray("あい うえお").length,2);
		assertEquals(ArrayString.toArray(" あい うえお")[0],"");
		assertEquals(ArrayString.toArray(" あい うえお").length,3);
		assertEquals(ArrayString.toArray("      ").length,7);
		assertEquals(ArrayString.toArray("あいうえお","い")[0],"あ");
		assertEquals(ArrayString.toArray("あいうえお","い").length,2);
		assertEquals(ArrayString.toArray("あいうえお","う")[0],"あい");
		assertEquals(ArrayString.toArray("あいうえお","う").length,2);
		assertEquals(ArrayString.toArray("あいうえお","あ")[0],"");
		assertEquals(ArrayString.toArray("あいうえお","あ").length,2);
		
	}
}
